package kr.bae.androidcomplete01;

import kr.bae.androidcomplete01.chapter06.Ch06MainActivity;
import kr.bae.androidcomplete01.chapter07.Ch07MainActivity;
import kr.bae.androidcomplete01.chapter08.Ch08MainActivity;
import kr.bae.androidcomplete01.chapter09.Ch09MainActivity;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

public class MainActivity extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
	}
	
	public void mOnClick(View v) {
		Intent i = null;
		
		switch (v.getId()) {
		case R.id.main_btn01:
			i = new Intent(MainActivity.this, Ch06MainActivity.class);
			break;

		case R.id.main_btn02:
			i = new Intent(MainActivity.this, Ch07MainActivity.class);
			break;
			
		case R.id.main_btn03:
			i = new Intent(MainActivity.this, Ch08MainActivity.class);
			break;
			
		case R.id.main_btn04:
			i = new Intent(MainActivity.this, Ch09MainActivity.class);
			break;
			
		default:
			break;
		}
		
		startActivity(i);
	}
}
